package com.example.movie.utils

import android.content.Context
import androidx.room.Room
import com.example.movie.common.db.AppDatabase
import com.example.movie.ui.MainActivity

object DbUtil {

    private fun getInstance(context: Context): AppDatabase {
        return Room.databaseBuilder(
            context,
            AppDatabase::class.java, "movie_db"
        ).build()
    }

    fun getInstance(): AppDatabase {
        return getInstance(ContextHolder.from(MainActivity::class))
    }


}